<?php

use App\Http\Controllers\SignController;
use App\Models\Menu;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view("admin");
//    return redirect('/admin');
});
Route::get("/install", function () {
    $isInstalled = count(Menu::all()) > 0;
    return view("install", compact("isInstalled"));
});
Route::post("/bootstrap", function () {
    return response()->json("安装成功");
});


//小程序签名路由


Route::any('signature', [SignController::class, 'checkSignature']);




//系统应用
//Route::get('{admin}/{path?}', function () {
//    return view('admin');
//})->where('admin', 'admin|auth')->where('path', '.*');

Route::fallback(function () {
    return view("admin");
});